﻿using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;

/// <summary>
/// 分析模型脚本
/// </summary>
public static class AnalysisModelScript
{
    /// <summary>
    /// 指标分析配置
    /// </summary>
    static AnalysisConfiguration AnalysisConfiguration { get; set; }
    /// <summary>
    /// 因子配置
    /// </summary>
    static List<FactorConfiguration> FactorConfigurations { get; set; }

    /// <summary>
    /// 模型配置
    /// </summary>
    static List<ModelConfiguration> ModelConfigurations { get; set; }



    public static string AnalysisConfigurationStr = @"{""analysisModels"":[""energyStatus"",""effortLevel"",""fatigueStatus"",""emotionManager"",""easyObedient"",""activeMind"",""focusOnInvestment"",""enterprising""],""statusCodes"":[""positive"",""serious"",""normal"",""common"",""relax"",""rest"",""-1""],""eventPointsUp"":[""difficult"",""detail"",""thinking"",""focus"",""downcast"",""nervous""],""eventPointsDown"":[""fatigue"",""helpless"",""worry"",""emotion"",""excite""]}";


    public static string FactorConfigurationStr = @"[
{""name"":""总体"",""code"":""totaldes"",""formula"":"""",""standard"":"""",""result"":""[""总体上"",""大体上"",""大致"",""综合来看"",""基本"",""多数"",""整体"",""数据分析来看"",""结果分析来看"",""评估提示""]"",""pattern"":""""},
{""name"":""谓语1"",""code"":""predicate1"",""formula"":"""",""standard"":"""",""result"":""[""处于"",""是"",""为""]"",""pattern"":""""},
{""name"":""谓语2"",""code"":""predicate2"",""formula"":"""",""standard"":"""",""result"":""[""出现"",""有"",""呈现""]"",""pattern"":""""},
{""name"":""连接词"",""code"":""connect"",""formula"":"""",""standard"":"""",""result"":""[""并且"",""且"",""同时""]"",""pattern"":""""},
{""name"":""趋势"",""code"":""status_trend"",""formula"":"""",""standard"":""-0.1|0.1"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""<=""},
{""name"":""频率"",""code"":""frequence"",""formula"":"""",""standard"":25|50,""result"":""[""偶尔"",""少许"",""偶发"",""较少"",""少量"",""稍许""]|[""间歇"",""断断续续"",""部分"",""一定"",""些许"",""片段""]|[""持续"",""不断"",""连续发生"",""明显"",""显著"",""较多""]"",""pattern"":""<=""},
{""name"":""频率"",""code"":""extevent_frequence"",""formula"":"""",""standard"":25|50,""result"":""[""偶尔"",""少许"",""偶发"",""较少"",""少量"",""稍许""]|[""间歇"",""断断续续"",""部分"",""一定"",""些许"",""片段""]|[""持续"",""不断"",""连续发生"",""明显"",""显著"",""较多""]"",""pattern"":""<=""},
{""name"":""烧脑"",""code"":""difficult"",""formula"":"""",""standard"":"""",""result"":""[""烧脑"",""费脑"",""深入分析"",""绞尽脑汁""]"",""pattern"":""""},
{""name"":""细节"",""code"":""detail"",""formula"":"""",""standard"":"""",""result"":""[""细节"",""仔细"",""细心观察"",""洞察""]"",""pattern"":""""},
{""name"":""思考"",""code"":""thinking"",""formula"":"""",""standard"":"""",""result"":""[""思考"",""动脑"",""思索"",""琢磨""]"",""pattern"":""""},
{""name"":""专心"",""code"":""focus"",""formula"":"""",""standard"":"""",""result"":""[""专心"",""专注"",""聚精会神"",""全神贯注""]"",""pattern"":""""},
{""name"":""低落"",""code"":""downcast"",""formula"":"""",""standard"":"""",""result"":""[""低落"",""消沉"",""有点压抑"",""沉闷""]"",""pattern"":""""},
{""name"":""紧张"",""code"":""nervous"",""formula"":"""",""standard"":"""",""result"":""[""紧张"",""着急"",""神经紧绷"",""不安感""]"",""pattern"":""""},
{""name"":""疲劳"",""code"":""fatigue"",""formula"":"""",""standard"":"""",""result"":""[""疲劳"",""疲惫"",""疲乏"",""疲倦""]"",""pattern"":""""},
{""name"":""无奈"",""code"":""helpless"",""formula"":"""",""standard"":"""",""result"":""[""无奈"",""无可奈何"",""无助"",""无力感""]"",""pattern"":""""},
{""name"":""担忧"",""code"":""worry"",""formula"":"""",""standard"":"""",""result"":""[""担忧"",""担心"",""情绪起伏"",""顾虑""]"",""pattern"":""""},
{""name"":""情感"",""code"":""emotion"",""formula"":"""",""standard"":"""",""result"":""[""情感"",""情感体验"",""触动"",""心情变化""]"",""pattern"":""""},
{""name"":""激动"",""code"":""excite"",""formula"":"""",""standard"":"""",""result"":""[""激动"",""焦躁"",""焦灼"",""心急""]"",""pattern"":""""},
{""name"":""精力水平"",""code"":""enegylevel"",""formula"":""energyStatus*3-fatigueStatus*1"",""standard"":""2|2.6"",""result"":""[""普通"",""一般"",""略低""]|[""中等"",""正常"",""尚可""]|[""充沛"",""充足"",""较好""]"",""pattern"":""""},
{""name"":""大脑活动"",""code"":""brainactivity"",""formula"":""focusOnInvestment*0.42+effortLevel*0.2+activeMind*0.35"",""standard"":""1.5|1.8"",""result"":""[""不多"",""一般"",""偏少""]|[""适度"",""正常"",""适中""]|[""活跃"",""敏捷"",""激烈""]"",""pattern"":""""},
{""name"":""情绪特质"",""code"":""emotiontrait"",""formula"":""enterprising*0.8+emotionManager*0.1+easyObedient*0.1"",""standard"":""1.4|1.9"",""result"":""[""率直"",""敏感"",""感性""]|[""平和求稳"",""克制稳定"",""稳健""]|[""争胜要强"",""进取沉稳"",""追求上进""]"",""pattern"":""""},
{""name"":""总体趋势"",""code"":""total_trend"",""formula"":"""",""standard"":""-0.01|0.05"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""精力水平趋势"",""code"":""enegylevel_trend"",""formula"":"""",""standard"":""-0.01|0.01"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""大脑活动趋势"",""code"":""brainactivity_trend"",""formula"":"""",""standard"":""-0.001|0.01"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""情绪特质"",""code"":""emotiontrait_trend"",""formula"":"""",""standard"":""-0.001|0.001"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""努力程度"",""code"":""effortLevel"",""formula"":""(thinking*1+thinkingActivity*1+lowFlow*1+singleMindedness*1+lfn*0.15)*100/16+max(0,(thinking-5)*10)+max(0,(lowFlow-5)*10)+max(0,(singleMindedness-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""专注投入"",""code"":""focusOnInvestment"",""formula"":""(lowFlow*2.1+singleMindedness*2.3+midFlow*5+highFlow*8)*100/8+max(0,(singleMindedness-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""好胜进取"",""code"":""enterprising"",""formula"":""(impatient*3.5+worryTrait*5+crisisSense*0.8+thinkingActivity*0.8)*100/10+max(0,(impatient-5)*10)+max(0,(worryTrait-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""情绪管理"",""code"":""emotionManager"",""formula"":""100-(emotionalActivity*0.8+emotionalStress*1+anxietyTrait*1+delicateSensitive*1+midMoodWave*0.8+highMoodWave*0.8+innerHelplessness*1+innerResistance*1)*100/6+max(0,(emotionalStress-5)*10)+max(0,(anxietyTrait-5)*10)+max(0,(innerHelplessness-5)*5)+max(0,(innerResistance-5)*8)"",""standard"":30|60,""result"":""1|2|3"",""pattern"":""""},
{""name"":""随和顺从"",""code"":""easyObedient"",""formula"":""100-(worry*1+worryTrait*1+delicateSensitive*1+midMoodWave*0.8+highMoodWave*0.8+innerHelplessness*1+innerResistance*1)*100/6+max(0,(worry-5)*20)+max(0,(worryTrait-5)*10)+max(0,(delicateSensitive-5)*10)"",""standard"":30|60,""result"":""1|2|3"",""pattern"":""""},
{""name"":"""""",""code"":""activeMind"",""formula"":""(thinkingActivity*0.5+thinking*1.4+lowFlow*1.3+singleMindedness*1.8+mentalStress*4)*100/5+max(0,(thinking-5)*5)+max(0,(lowFlow-5)*8)+max(0,(singleMindedness-5)*10)+max(0,(mentalStress-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":"""""",""code"":""fatigueStatus"",""formula"":""(mentalFatigue*6+visualFatigue*6+lowDepress*6+midDepress*8+highDepress*10-lfn*0.1)*100/28+max(0,(mentalFatigue-5)*10)+max(0,(lowDepress-5)*10)+max(0,(midDepress-5)*10)+max(0,(highDepress-5)*10)"",""standard"":""17|40|85|95"",""result"":""1|2|3|4|5"",""pattern"":""""},
{""name"":""精神面貌"",""code"":""energyStatus"",""formula"":""(lfn*0.2-mentalFatigue*2.5-visualFatigue*1+thinkingActivity*1.8+crisisSense*1.8+lowAnxiety*0.8+midAnxiety*1+ highAnxiety*1-lowDepress*1.2-midDepress*1.2-highDepress*1.5)*100/30 + max(0,(thinkingActivity-5)*3)+max(0,(crisisSense-5)*5)+max(0,(highAnxiety-5)*5) - max(0,(lowDepress-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""}
]";

    public static string ModelConfigurationStr = @"[
{""name"":""总体"",""code"":""totaldes"",""formula"":"""",""standard"":"""",""result"":""[""总体上"",""大体上"",""大致"",""综合来看"",""基本"",""多数"",""整体"",""数据分析来看"",""结果分析来看"",""评估提示""]"",""pattern"":""""},
{""name"":""谓语1"",""code"":""predicate1"",""formula"":"""",""standard"":"""",""result"":""[""处于"",""是"",""为""]"",""pattern"":""""},
{""name"":""谓语2"",""code"":""predicate2"",""formula"":"""",""standard"":"""",""result"":""[""出现"",""有"",""呈现""]"",""pattern"":""""},
{""name"":""连接词"",""code"":""connect"",""formula"":"""",""standard"":"""",""result"":""[""并且"",""且"",""同时""]"",""pattern"":""""},
{""name"":""趋势"",""code"":""status_trend"",""formula"":"""",""standard"":""-0.1|0.1"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""<=""},
{""name"":""频率"",""code"":""frequence"",""formula"":"""",""standard"":25|50,""result"":""[""偶尔"",""少许"",""偶发"",""较少"",""少量"",""稍许""]|[""间歇"",""断断续续"",""部分"",""一定"",""些许"",""片段""]|[""持续"",""不断"",""连续发生"",""明显"",""显著"",""较多""]"",""pattern"":""<=""},
{""name"":""频率"",""code"":""extevent_frequence"",""formula"":"""",""standard"":25|50,""result"":""[""偶尔"",""少许"",""偶发"",""较少"",""少量"",""稍许""]|[""间歇"",""断断续续"",""部分"",""一定"",""些许"",""片段""]|[""持续"",""不断"",""连续发生"",""明显"",""显著"",""较多""]"",""pattern"":""<=""},
{""name"":""烧脑"",""code"":""difficult"",""formula"":"""",""standard"":"""",""result"":""[""烧脑"",""费脑"",""深入分析"",""绞尽脑汁""]"",""pattern"":""""},
{""name"":""细节"",""code"":""detail"",""formula"":"""",""standard"":"""",""result"":""[""细节"",""仔细"",""细心观察"",""洞察""]"",""pattern"":""""},
{""name"":""思考"",""code"":""thinking"",""formula"":"""",""standard"":"""",""result"":""[""思考"",""动脑"",""思索"",""琢磨""]"",""pattern"":""""},
{""name"":""专心"",""code"":""focus"",""formula"":"""",""standard"":"""",""result"":""[""专心"",""专注"",""聚精会神"",""全神贯注""]"",""pattern"":""""},
{""name"":""低落"",""code"":""downcast"",""formula"":"""",""standard"":"""",""result"":""[""低落"",""消沉"",""有点压抑"",""沉闷""]"",""pattern"":""""},
{""name"":""紧张"",""code"":""nervous"",""formula"":"""",""standard"":"""",""result"":""[""紧张"",""着急"",""神经紧绷"",""不安感""]"",""pattern"":""""},
{""name"":""疲劳"",""code"":""fatigue"",""formula"":"""",""standard"":"""",""result"":""[""疲劳"",""疲惫"",""疲乏"",""疲倦""]"",""pattern"":""""},
{""name"":""无奈"",""code"":""helpless"",""formula"":"""",""standard"":"""",""result"":""[""无奈"",""无可奈何"",""无助"",""无力感""]"",""pattern"":""""},
{""name"":""担忧"",""code"":""worry"",""formula"":"""",""standard"":"""",""result"":""[""担忧"",""担心"",""情绪起伏"",""顾虑""]"",""pattern"":""""},
{""name"":""情感"",""code"":""emotion"",""formula"":"""",""standard"":"""",""result"":""[""情感"",""情感体验"",""触动"",""心情变化""]"",""pattern"":""""},
{""name"":""激动"",""code"":""excite"",""formula"":"""",""standard"":"""",""result"":""[""激动"",""焦躁"",""焦灼"",""心急""]"",""pattern"":""""},
{""name"":""精力水平"",""code"":""enegylevel"",""formula"":""energyStatus*3-fatigueStatus*1"",""standard"":""2|2.6"",""result"":""[""普通"",""一般"",""略低""]|[""中等"",""正常"",""尚可""]|[""充沛"",""充足"",""较好""]"",""pattern"":""""},
{""name"":""大脑活动"",""code"":""brainactivity"",""formula"":""focusOnInvestment*0.42+effortLevel*0.2+activeMind*0.35"",""standard"":""1.5|1.8"",""result"":""[""不多"",""一般"",""偏少""]|[""适度"",""正常"",""适中""]|[""活跃"",""敏捷"",""激烈""]"",""pattern"":""""},
{""name"":""情绪特质"",""code"":""emotiontrait"",""formula"":""enterprising*0.8+emotionManager*0.1+easyObedient*0.1"",""standard"":""1.4|1.9"",""result"":""[""率直"",""敏感"",""感性""]|[""平和求稳"",""克制稳定"",""稳健""]|[""争胜要强"",""进取沉稳"",""追求上进""]"",""pattern"":""""},
{""name"":""总体趋势"",""code"":""total_trend"",""formula"":"""",""standard"":""-0.01|0.05"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""精力水平趋势"",""code"":""enegylevel_trend"",""formula"":"""",""standard"":""-0.01|0.01"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""大脑活动趋势"",""code"":""brainactivity_trend"",""formula"":"""",""standard"":""-0.001|0.01"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""情绪特质"",""code"":""emotiontrait_trend"",""formula"":"""",""standard"":""-0.001|0.001"",""result"":""[""处于下行趋势"",""逐渐下降"",""有下降趋势""]|[""比较稳定"",""相对平稳"",""基本保持不变""]|[""趋向积极"",""逐渐变好"",""呈上升趋势""]"",""pattern"":""""},
{""name"":""努力程度"",""code"":""effortLevel"",""formula"":""(thinking*1+thinkingActivity*1+lowFlow*1+singleMindedness*1+lfn*0.15)*100/16+max(0,(thinking-5)*10)+max(0,(lowFlow-5)*10)+max(0,(singleMindedness-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""专注投入"",""code"":""focusOnInvestment"",""formula"":""(lowFlow*2.1+singleMindedness*2.3+midFlow*5+highFlow*8)*100/8+max(0,(singleMindedness-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""好胜进取"",""code"":""enterprising"",""formula"":""(impatient*3.5+worryTrait*5+crisisSense*0.8+thinkingActivity*0.8)*100/10+max(0,(impatient-5)*10)+max(0,(worryTrait-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":""情绪管理"",""code"":""emotionManager"",""formula"":""100-(emotionalActivity*0.8+emotionalStress*1+anxietyTrait*1+delicateSensitive*1+midMoodWave*0.8+highMoodWave*0.8+innerHelplessness*1+innerResistance*1)*100/6+max(0,(emotionalStress-5)*10)+max(0,(anxietyTrait-5)*10)+max(0,(innerHelplessness-5)*5)+max(0,(innerResistance-5)*8)"",""standard"":30|60,""result"":""1|2|3"",""pattern"":""""},
{""name"":""随和顺从"",""code"":""easyObedient"",""formula"":""100-(worry*1+worryTrait*1+delicateSensitive*1+midMoodWave*0.8+highMoodWave*0.8+innerHelplessness*1+innerResistance*1)*100/6+max(0,(worry-5)*20)+max(0,(worryTrait-5)*10)+max(0,(delicateSensitive-5)*10)"",""standard"":30|60,""result"":""1|2|3"",""pattern"":""""},
{""name"":"""""",""code"":""activeMind"",""formula"":""(thinkingActivity*0.5+thinking*1.4+lowFlow*1.3+singleMindedness*1.8+mentalStress*4)*100/5+max(0,(thinking-5)*5)+max(0,(lowFlow-5)*8)+max(0,(singleMindedness-5)*10)+max(0,(mentalStress-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""},
{""name"":"""""",""code"":""fatigueStatus"",""formula"":""(mentalFatigue*6+visualFatigue*6+lowDepress*6+midDepress*8+highDepress*10-lfn*0.1)*100/28+max(0,(mentalFatigue-5)*10)+max(0,(lowDepress-5)*10)+max(0,(midDepress-5)*10)+max(0,(highDepress-5)*10)"",""standard"":""17|40|85|95"",""result"":""1|2|3|4|5"",""pattern"":""""},
{""name"":""精神面貌"",""code"":""energyStatus"",""formula"":""(lfn*0.2-mentalFatigue*2.5-visualFatigue*1+thinkingActivity*1.8+crisisSense*1.8+lowAnxiety*0.8+midAnxiety*1+ highAnxiety*1-lowDepress*1.2-midDepress*1.2-highDepress*1.5)*100/30 + max(0,(thinkingActivity-5)*3)+max(0,(crisisSense-5)*5)+max(0,(highAnxiety-5)*5) - max(0,(lowDepress-5)*10)"",""standard"":50|80,""result"":""1|2|3"",""pattern"":""""}
]";


    /// <summary>
    /// 加载配置
    /// </summary>
    /// <param name="analysisConfiguration">指标分析配置json</param>
    /// <param name="factorConfiguration">因子配置json</param>
    /// <param name="modelConfiguration">模型配置json</param>
    /// <returns></returns>
    public static bool LoadConfiguration(string analysisConfiguration, string factorConfiguration, string modelConfiguration)
    {
        try
        {
            AnalysisConfiguration = JsonConvert.DeserializeObject<AnalysisConfiguration>(analysisConfiguration);
            ModelConfigurations = JsonConvert.DeserializeObject<List<ModelConfiguration>>(modelConfiguration);
            FactorConfigurations = JsonConvert.DeserializeObject<List<FactorConfiguration>>(factorConfiguration);
            foreach (var factor in FactorConfigurations)
            {
                // 无标准分级的时候，默认为0
                if (string.IsNullOrEmpty(factor.standard))
                {
                    factor.standards = new List<double>();
                    factor.results = JsonConvert.DeserializeObject<List<string>>(factor.result).Cast<object>().ToList();
                }
                else
                {
                    // 按‘｜’对字符串进行分割
                    string[] standards = factor.standard.Split('|');
                    string[] results = factor.result.Split('|');
                    // 标准和结果个数不匹配，返回false，结果应该比标准多一个
                    if (factor.standards.Count != results.Length - 1)
                    {
                        return false;
                    }
                    factor.standards = standards.Select(s => double.Parse(s)).ToList();

                    factor.results = new List<object>();
                    // 循环将标准和结果作为键值对放入字典
                    for (int i = 0; i < results.Length; i++)
                    {
                        // 尝试解析成整数（等级）
                        if (int.TryParse(results[i], out int result))
                        {
                            factor.results.Add(result);
                        }
                        else  // 解析成字符串数组
                        {
                            factor.results.Add(JsonConvert.DeserializeObject<List<string>>(results[i]));
                        }
                    }
                }
            }
        }
        catch
        {
            return false;
        }

        return true;
    }
}

/// <summary>
/// 指标分析配置
/// </summary>
public class AnalysisConfiguration
{
    /// <summary>
    /// 二级指标
    /// </summary>
    public List<string> analysisModels { get; set; }
    /// <summary>
    /// 状态码
    /// </summary>
    public List<string> statusCodes { get; set; }
    /// <summary>
    /// 上面的事件点
    /// </summary>
    public List<string> eventPointsUp { get; set; }
    /// <summary>
    /// 下面的事件点
    /// </summary>
    public List<string> eventPointsDown { get; set; }
}

/// <summary>
/// 因子配置
/// </summary>
public class FactorConfiguration
{
    /// <summary>
    /// 名称
    /// </summary>
    public string name { get; set; }
    /// <summary>
    /// 唯一编码
    /// </summary>
    public string code { get; set; }
    /// <summary>
    /// 公式
    /// </summary>
    public string formula { get; set; }
    /// <summary>
    /// 标准
    /// </summary>
    public string standard { get; set; }
    /// <summary>
    /// 结果
    /// </summary>
    public string result { get; set; }
    /// <summary>
    /// 范式
    /// </summary>
    public string pattern { get; set; }
    /// <summary>
    /// 标准列表
    /// </summary>
    public List<double> standards { get; set; }
    /// <summary>
    /// 结果列表
    /// </summary>
    public List<object> results { get; set; }
}

/// <summary>
/// 模型配置
/// </summary>
public class ModelConfiguration
{
    /// <summary>
    /// 名称
    /// </summary>
    public string name { get; set; }
    /// <summary>
    /// 唯一编码
    /// </summary>
    public string code { get; set; }
    /// <summary>
    /// 关联因子
    /// </summary>
    public string related_cfactors { get; set; }
}



